home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / rmqb01.zip / READDEF.BAS < prev    next >
BASIC Source File  |  1991-11-06  |  720b  |  35 lines

  1. '                         ReadDef.bas
  2. '
  3. ' Purpose : Displays a DEF file
  4. ' Compiler: QuickBASIC 4.5
  5. ' Date    : Nov 4, 1991
  6.  
  7. DEFINT A-Z
  8.  
  9. x = 120
  10. y = 50
  11. xoff = 0
  12. yoff = 0
  13.  
  14. SCREEN 7       ' 320X200X16
  15.  
  16. OPEN "rm.def" FOR INPUT AS #1      ' Rm.def must be in the
  17. WHILE NOT EOF(1)                   ' current directory.
  18.  c$ = INPUT$(1, #1)
  19.  IF (ASC(c$) > 64) AND (ASC(c$) < 71) THEN
  20.     col = ASC(c$) - 55
  21.     PSET (x + xoff, y + yoff), col
  22.     xoff = xoff + 1
  23.  ELSEIF (ASC(c$) > 47) AND (ASC(c$) < 58) THEN
  24.     col = ASC(c$) - 48
  25.     PSET (x + xoff, y + yoff), col
  26.     xoff = xoff + 1
  27.  ELSEIF c$ = CHR$(13) THEN
  28.     c$ = INPUT$(1, #1)
  29.     yoff = yoff + 1
  30.     xoff = 0
  31.  END IF
  32. WEND
  33. CLOSE #1
  34.  
  35.